import Vue from 'vue';
import Vuex from 'vuex';
import App from './App';
import uView from './framework/uview-ui/index';
import httpClient from './framework/utils/httpClient';
import * as config from './framework/utils/config';
import storage from './framework/utils/storage';
import utils from './framework/utils/utils';
import APIPath from './framework/utils/APIPath';
import store from "./framework/store";
import filters from './framework/utils/filters'
import HFooter from "./components/comm/HFooter";
import HHead from "./components/comm/HHead";
import HEmpty from "./components/comm/HEmpty";

Vue.config.productionTip = false;
Vue.component('HFooter', HFooter)
Vue.component('HHead', HHead)
Vue.component('HEmpty', HEmpty)

App.mpType = 'app';

Vue.use(uView);
Vue.use(Vuex);

Vue.prototype.httpClient = httpClient;
Vue.prototype.utils = utils;
Vue.prototype.APIPath = APIPath;
Vue.prototype.storage = storage;
Vue.prototype.globalConfig = config;
Vue.prototype.vxFilter = filters;
Vue.prototype.eventBus = new Vue();

// 添加全局filter
Object.keys(filters).map(v => {
	Vue.filter(v, filters[v])
})

const app = new Vue({
	store,
	...App
});

app.$mount();
